<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/order/workbusiness/EQU_TOOLS_FIXTURES.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/order/workbusiness/EQU_TOOLS_FIXTURES.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Id',
                footer: "Foots",
                cnName: '工装治具',
                name: 'workbusiness/EQU_TOOLS_FIXTURES',
                url: "/EQU_TOOLS_FIXTURES/",
                sortName: "ToolsFixType"
            });
            const editFormFields = ref({"Identifier":"","ToolsFixNameZH":"","SupplierId":"","MaxRepairNum":"","Description":"","ToolsFixType":"","Accuracy":"","Position":"","UseState":"","Length":"","Width":"","Height":"","TollsFixModel":""});
            const editFormOptions = ref([[{"title":"编码","field":"Identifier","type":"text"},
                               {"title":"名称","field":"ToolsFixNameZH","type":"text"},
                               {"dataKey":"供应商","data":[],"title":"供应商","field":"SupplierId","type":"select"},
                               {"title":"最大维修次数","field":"MaxRepairNum","type":"number"},
                               {"title":"描述","field":"Description","type":"number"}],
                              [{"dataKey":"工装治具分类显示","data":[],"title":"类型","field":"ToolsFixType","type":"select"},
                               {"title":"精度","field":"Accuracy","type":"text"},
                               {"title":"位置","field":"Position","type":"text"},
                               {"dataKey":"是否使用状态","data":[],"title":"使用状态","field":"UseState","type":"select"}],
                              [{"title":"长","field":"Length","type":"number"},
                               {"title":"宽","field":"Width","type":"number"},
                               {"title":"高","field":"Height","type":"number"},
                               {"title":"型号","field":"TollsFixModel"}]]);
            const searchFormFields = ref({"Identifier":"","ToolsFixNameZH":"","ToolsFixType":""});
            const searchFormOptions = ref([[{"dataKey":"工装治具分类显示","data":[],"title":"类型","field":"ToolsFixType","type":"select"},{"title":"编码","field":"Identifier","type":"text"},{"title":"名称","field":"ToolsFixNameZH","type":"like"}]]);
            const columns = ref([{field:'Id',title:'Id',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'Identifier',title:'编码',type:'string',width:110,align:'left',sort:true},
                       {field:'ToolsFixNameZH',title:'名称',type:'string',width:110,align:'left'},
                       {field:'SupplierId',title:'供应商',type:'string',bind:{ key:'供应商',data:[]},width:110,align:'left'},
                       {field:'MaxRepairNum',title:'最大维修次数',type:'int',width:110,align:'left'},
                       {field:'ToolsFixType',title:'类型',type:'string',bind:{ key:'工装治具分类显示',data:[]},width:120,align:'left'},
                       {field:'Accuracy',title:'精度',type:'decimal',width:110,align:'left'},
                       {field:'Position',title:'位置',type:'string',width:120,align:'left'},
                       {field:'UseState',title:'使用状态',type:'string',bind:{ key:'是否使用状态',data:[]},width:120,align:'left'},
                       {field:'Length',title:'长',type:'decimal',width:110,align:'left'},
                       {field:'Width',title:'宽',type:'decimal',width:110,align:'left'},
                       {field:'Height',title:'高',type:'decimal',width:110,align:'left'},
                       {field:'TollsFixModel',title:'型号',type:'string',width:120,align:'left'},
                       {field:'Status',title:'状态',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateBy',title:'创建人',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateOn',title:'创建时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'UpdateBy',title:'更新人',type:'string',width:110,hidden:true,align:'left'},
                       {field:'LastUpdateOn',title:'更新时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'IsDeleted',title:'逻辑删除 0/不删除 1/已删除',type:'bool',width:110,hidden:true,align:'left'},
                       {field:'RfidCode',title:'RfidCode',type:'string',width:120,align:'left'},
                       {field:'Description',title:'描述',type:'string',width:110,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
